@import "~pc/styles/lib_mixins.less";
@import "~pc/styles/lib_screen.less";

.enhanceText {
  text-decoration: underline;
  color: var(--primaryColor);
  cursor: pointer;
}

.enhanceTextEditor {
  display: flex;
  align-items: center;
  position: relative;
  padding-right: 16px;
  img {
    width: 16px;
    height: 16px;
    margin-right: 4px;
  }
  .urlInput {
    width: calc(100% - 16px);
  }
  input {
    font-size: 13px;
  }
}

.enhanceTextIcon {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  line-height: 1;
  &.hover {
    padding: 4px;
    border-radius: 4px;
    &:hover {
      background-color: var(--rowSelectedBgSolid);
    }
  }
}

.textEditor {
  width: 100%;
  position: relative;
  box-sizing: border-box;
  box-shadow: 0px 0px 0px 2px var(--primaryColor);
  border-radius: 1px;
  background: transparent;
  .light-scroll-bar();

  input {
    width: 100%;
    max-height: 200px;
    height: auto;
    resize: none;
    border: none;
    outline: none;
    background: transparent;
    display: block;
    line-height: 24px;
    box-sizing: border-box;
    padding: 3px 10px;
    font-size: 13px;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

.content {
  align-items: center;
  bottom: 4px;
  display: flex;
  left: 8px;
  line-height: 34px;
  max-width: 80%;
  position: absolute;
  top: 2px;
  white-space: nowrap;
  .title {
    width: 100%;
    color: var(--textCommonPrimary);
    &:hover {
      color: var(--textCommonSecondary);
    }
    &:active {
      color: var(--textCommonTertiary);
    }
    span {
      text-overflow: ellipsis;
      display: block;
      overflow: hidden;
      font-size: 13px;
    }
  }
  & > span {
    font-size: 13px;
  }
}

@media screen and (max-width: @w-md) {
  .textEditor {
    input {
      padding: 0;
      font-size: 14px;
    }
  }

  .enhanceTextEditor {
    padding-left: 10px;
  }

  .enhanceTextIcon {
    svg {
      width: 16px;
      height: 16px;
    }
  }
}